﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Mobile.Master"
    Inherits="System.Web.Mvc.ViewPage<Telerik.Web.Mvc.GridModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div data-role="navbar">
        <ul>
            <li><a href="#" class="ui-btn-active ui-state-persist">产品分类</a></li>
        </ul>
    </div>
    <div data-role="tabs">
        <ul class="tablist-left" data-role="listview" data-inset="true">
            <%
                List<Microhard.Protal.Models.CategoryModel> all = new List<Microhard.Protal.Models.CategoryModel>();
                foreach (var p in Model.Data)
                {
                    var cm = p as Microhard.Protal.Models.CategoryModel;
                    if (cm != null)
                    {
                        all.Add(cm);     
            %>
            <li><a href="#<%= cm.CategoryID%>" data-ajax="false">
                <%=cm.Name %></a></li>
            <%    }
                }%>
        </ul>
        <%foreach (var c in all)
          { %>
        <ul class="tablist-content" id="<%= cm.CategoryID%>" data-role="listview" data-inset="true">
            <%foreach (var p in c.Products)
              { %>
            <li><a href="">
                <%=Url.Action("View", "Product",new{identity = p.ProductID})%>
                <%=p.Name %></a></li>
            <%} %>
        </ul>
        <%} %>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <input type="submit" value="结算" data-theme="c" id="btnSubmit" name="btnSubmit" />
    </div>
</asp:Content>
